<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Enrich Processor | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'enrich-processor.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/enrich-processor.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/enrich-processor.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/enrich-processor.html" rel="nofollow" target="_blank">../en/enrich-processor.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="ingest.html">Ingest node</a></span>
»
<span class="breadcrumb-link"><a href="ingest-processors.html">Processors</a></span>
»
<span class="breadcrumb-node">Enrich Processor</span>
</div>
<div class="navheader">
<span class="prev">
<a href="drop-processor.html">« Drop Processor</a>
</span>
<span class="next">
<a href="fail-processor.html">Fail Processor »</a>
</span>
</div>
<div class="section xpack">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="enrich-processor"></a>Enrich Processor<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/ingest/processors/enrich.asciidoc">edit</a><a class="xpack_tag" href="https://www.elastic.co/subscriptions"></a>
</h2>
</div></div></div>
<p>The <code class="literal">enrich</code> processor can enrich documents with data from another index.
See <a class="xref" href="ingest-enriching-data.html" title="Enrich your data">enrich data</a> section for more information about how to set this up.</p>
<div class="table">
<a id="enrich-options"></a>
<p class="title"><strong>Table 44. Enrich Options</strong></p>
<div class="table-contents">
<table border="1" cellpadding="4px" summary="Enrich Options">
<colgroup>
<col class="col_1">
<col class="col_2">
<col class="col_3">
<col class="col_4">
</colgroup>
<thead>
<tr>
<th align="left" valign="top">Name</th>
<th align="left" valign="top">Required</th>
<th align="left" valign="top">Default</th>
<th align="left" valign="top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p><code class="literal">policy_name</code></p></td>
<td align="left" valign="top"><p>yes</p></td>
<td align="left" valign="top"><p>-</p></td>
<td align="left" valign="top"><p>The name of the enrich policy to use.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">field</code></p></td>
<td align="left" valign="top"><p>yes</p></td>
<td align="left" valign="top"><p>-</p></td>
<td align="left" valign="top"><p>The field in the input document that matches the policies match_field used to retrieve the enrichment data. Supports <a class="xref" href="accessing-data-in-pipelines.html#accessing-template-fields" title="Accessing Fields and Metafields in Templates">template snippets</a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">target_field</code></p></td>
<td align="left" valign="top"><p>yes</p></td>
<td align="left" valign="top"><p>-</p></td>
<td align="left" valign="top"><p>Field added to incoming documents to contain enrich data. This field contains both the <code class="literal">match_field</code> and <code class="literal">enrich_fields</code> specified in the <a class="xref" href="enrich-policy-definition.html" title="Enrich policy definition">enrich policy</a>. Supports <a class="xref" href="accessing-data-in-pipelines.html#accessing-template-fields" title="Accessing Fields and Metafields in Templates">template snippets</a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">ignore_missing</code></p></td>
<td align="left" valign="top"><p>no</p></td>
<td align="left" valign="top"><p>false</p></td>
<td align="left" valign="top"><p>If <code class="literal">true</code> and <code class="literal">field</code> does not exist, the processor quietly exits without modifying the document</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">override</code></p></td>
<td align="left" valign="top"><p>no</p></td>
<td align="left" valign="top"><p>true</p></td>
<td align="left" valign="top"><p>If processor will update fields with pre-existing non-null-valued field. When set to <code class="literal">false</code>, such fields will not be touched.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">max_matches</code></p></td>
<td align="left" valign="top"><p>no</p></td>
<td align="left" valign="top"><p>1</p></td>
<td align="left" valign="top"><p>The maximum number of matched documents to include under the configured target field. The <code class="literal">target_field</code> will be turned into a json array if <code class="literal">max_matches</code> is higher than 1, otherwise <code class="literal">target_field</code> will become a json object. In order to avoid documents getting too large, the maximum allowed value is 128.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">shape_relation</code></p></td>
<td align="left" valign="top"><p>no</p></td>
<td align="left" valign="top"><p><code class="literal">INTERSECTS</code></p></td>
<td align="left" valign="top"><p>A spatial relation operator used to match the <a class="xref" href="geo-shape.html" title="Geo-shape datatype">geo_shape</a> of incoming documents to documents in the enrich index. This option is only used for <code class="literal">geo_match</code> enrich policy types. The <a class="xref" href="geo-shape.html#spatial-strategy" title="Spatial strategies">geo_shape strategy</a> mapping parameter determines which spatial relation operators are available. See <a class="xref" href="query-dsl-geo-shape-query.html#_spatial_relations" title="Spatial Relations">Spatial Relations</a> for operators and more information.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">if</code></p></td>
<td align="left" valign="top"><p>no</p></td>
<td align="left" valign="top"><p>-</p></td>
<td align="left" valign="top"><p>Conditionally execute this processor.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">on_failure</code></p></td>
<td align="left" valign="top"><p>no</p></td>
<td align="left" valign="top"><p>-</p></td>
<td align="left" valign="top"><p>Handle failures for this processor. See <a class="xref" href="handling-failure-in-pipelines.html" title="Handling Failures in Pipelines"><em>Handling Failures in Pipelines</em></a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">ignore_failure</code></p></td>
<td align="left" valign="top"><p>no</p></td>
<td align="left" valign="top"><p><code class="literal">false</code></p></td>
<td align="left" valign="top"><p>Ignore failures for this processor. See <a class="xref" href="handling-failure-in-pipelines.html" title="Handling Failures in Pipelines"><em>Handling Failures in Pipelines</em></a>.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p><code class="literal">tag</code></p></td>
<td align="left" valign="top"><p>no</p></td>
<td align="left" valign="top"><p>-</p></td>
<td align="left" valign="top"><p>An identifier for this processor. Useful for debugging and metrics.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="navfooter">
<span class="prev">
<a href="drop-processor.html">« Drop Processor</a>
</span>
<span class="next">
<a href="fail-processor.html">Fail Processor »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>